<?php $this
	->widget('zii.widgets.grid.CGridView',
		array(
			'id' => 'material-receipt-item-grid',
			'dataProvider' => new CArrayDataProvider($items,
				array(
					'pagination' => false
				)),
			'enablePagination' => false,
			'template' => "{items}",
			'columns' => array(
				array(
					'header' => '',
					'type' => 'raw',
					'value' => '$row+1'
				),
				array(
					'header' => '物品',
					'name' => 'materialModelId',
					'type' => 'raw',
					'value' => '$data->materialModel->getModelName()'
				),
				array(
					'name' => 'amount',
					'type' => 'amount',
					'header' => '数量',
				),
				array(
					'name' => 'unit',
					'header' => '单位',
				),
				array(
					'name' => 'amountStandardUnit',
					'type' => 'amount',
					'header' => '折合标准数量',
				),
				array(
					'name' => 'materialModel.unit',
					'header' => '标准单位',
				),
				array(
					'name' => 'unitPrice',
					'type' => 'currency',
					'header' => '单价',
				),
				array(
					'name' => 'standardUnitPrice',
					'type' => 'currency',
					'header' => '标准单位单价',
				),
				array(
					'name' => 'totalPrice',
					'type' => 'currency',
					'header' => '总价',
				),
				array(
					'name' => 'note',
					'header' => '备注',
				),
			),
		));
?>
